/**
 * Created by Deng on 2016-10-16.
 */

window.appModule.factory('questionEditAPI',factoryFn);

function factoryFn($resource){
    var actions = {
        getRobotById: {
            url: ENV['API_URL']+'/openfaqserver/getRobotById.action',
            method: 'post'
        },
        saveQuestion: {
            url: ENV['API_URL']+'/openfaqserver/addQuestion.action',
            method: 'post'
        },
        updateQuestion: {
            url: ENV['API_URL']+'/openfaqserver/updateQuestion.action',
            method: 'post'
        },
        queryQuestionDetail: {
            url: ENV['API_URL']+'/openfaqserver/getQuestionById.action',
            method: 'post'
        },
        getUserById: {
            url: ENV['API_URL']+'/openfaqserver/getUserById.action',
            method: 'post'
        },
        getMenusByUserId: {
            url: ENV['API_URL']+'/openfaqserver/getMenusByUserId.action',
            method: 'post'
        },
        logOut: {
            url: ENV['API_URL']+'/openfaqserver/logOut.action',
            method: 'post'
        }
    }
    return $resource('', {_ajaxWrapOption: {}},actions);
}